package day03;
/** switch...case的结构演示*/
public class SwitchCaseDemo {
    public static void main(String[] args) {
        //1）//整数判断相当
        int num = 2;  //byte、short、char、int、String和枚举
        switch (num){
            case 1:  //if(num==1)
                System.out.println(111);
                break;
            case 2:  //以此为入口
                System.out.println(222);
                break;  //跳出switch
            case 3 :
                System.out.println(333);
                break;
            default:  //所有case都未匹配时执行
                System.out.println(444);
        }
    }
}
